<?php

/**
 * Created by IntelliJ IDEA.
 * User: keke
 * Date: 18-10-26
 * Time: 下午4:23
 */
require_once "../congfig/config.php";
require_once "../lib/common.php";
$uid = $_POST['uid'];
$realname = $_POST['realname'];
$age = $_POST['age'];
$phone = $_POST['phone'];
if($age==null||$realname==null||$phone==null)
{
    exit(jsoncall("-1", "不能为信息为空"));
}
$sql = "UPDATE userinfor SET realname = '$realname', age = '$age', phone = '$phone' WHERE uid = '$uid'  ";

$query = $conn->query($sql);
if ($query) {
    exit(jsoncall("1", "修改信息成功"));
} else {
    exit(jsoncall("-1", "修改信息失败"));
}